<template>
  <div>
     profile 
  </div>
</template>

<script>
import {reqUserInfo} from '../../api/profile'
export default {
  name:'',
  data () {
    return {
       
    };
  },
  created() {
    this.getUserInfo()
  },
  methods: {
    async getUserInfo(){
      const result = await reqUserInfo(JSON.parse(localStorage.getItem('id')))
      this.user = result[0]
    },
    resetUser(){
      if(window.confirm('您确定要退出吗?')){
          this.$store.dispatch('resetUser')
          this.$router.replace('/')
        }
    }
  },
}

</script>
<style lang='less' scoped>
</style>